package com.jaylli.ai;

import com.jaylli.ai.services.McpServerDateService;
import org.springframework.ai.chat.memory.ChatMemory;
import org.springframework.ai.chat.memory.InMemoryChatMemory;
import org.springframework.ai.embedding.EmbeddingModel;
import org.springframework.ai.reader.TextReader;
import org.springframework.ai.tool.ToolCallbackProvider;
import org.springframework.ai.tool.method.MethodToolCallbackProvider;
import org.springframework.ai.transformer.splitter.TokenTextSplitter;
import org.springframework.ai.vectorstore.SimpleVectorStore;
import org.springframework.ai.vectorstore.VectorStore;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.core.io.Resource;
import org.springframework.web.reactive.function.client.WebClient;

/**
 * @author xushu
 * @version 1.0.0
 * @description
 */
@SpringBootApplication
public class SpringAiMcpServerApplication {

    public static void main(String[] args) {
        SpringApplication.run(SpringAiMcpServerApplication.class, args);
    }

    @Bean
    public ToolCallbackProvider tools(McpServerDateService dateTimeService) {
        return MethodToolCallbackProvider.builder()
                .toolObjects(dateTimeService)
                .build();
    }


//    @Bean
//    public WebClient.Builder webClientBuilder() {
//        return WebClient.builder();
//    }

}
